<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试卷预览 - 教材资源管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .paper-shadow {
                box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            }
            .page-break {
                page-break-after: always;
            }
            .question-item {
                counter-increment: question-counter;
            }
            .question-item::before {
                content: counter(question-counter) ". ";
                font-weight: bold;
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <button id="sidebar-toggle" class="lg:hidden text-gray-500 hover:text-primary transition-colors">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-xl font-bold text-primary flex items-center">
                    <i class="fa fa-book mr-2"></i>
                    <span>教材资源管理系统</span>
                </h1>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">教材版本</a>
                <a href="#" class="text-primary font-medium border-b-2 border-primary pb-1">统计分析</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">系统设置</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索题目..." 
                           class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-40 lg:w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
                
                <div class="relative">
                    <button class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-bell text-xl"></i>
                        <span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </button>
                </div>
                
                <div class="flex items-center space-x-2 cursor-pointer group">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-transparent group-hover:border-primary transition-all">
                    <span class="hidden md:inline font-medium">张老师</span>
                    <i class="fa fa-angle-down text-gray-400 group-hover:text-primary transition-colors"></i>
                </div>
            </div>
        </div>
    </header>

    <div class="flex flex-1 overflow-hidden">
        <!-- 左侧边栏 - 教材版本与章节导航 -->
        <aside id="sidebar" class="w-64 bg-white shadow-md transform -translate-x-full lg:translate-x-0 fixed lg:static h-full z-40 transition-transform duration-300 ease-in-out overflow-y-auto scrollbar-hide">
            <div class="p-4 border-b">
                <div class="flex items-center justify-between mb-3">
                    <h2 class="font-bold text-lg">教材版本导航</h2>
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 rounded-lg px-3 py-1 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option>全部学科</option>
                            <option selected>数学</option>
                            <option>物理</option>
                            <option>化学</option>
                            <option>生物</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
                
                <div class="relative">
                    <input type="text" placeholder="搜索章节..." 
                           class="w-full pl-8 pr-4 py-2 rounded-lg bg-gray-100 focus:outline-none focus:ring-1 focus:ring-primary">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
            </div>
            
            <!-- 教材版本选择 -->
            <div class="p-4 border-b">
                <h3 class="font-medium text-sm text-gray-500 mb-2">选择教材版本</h3>
                <div class="space-y-2">
                    <div class="relative">
                        <select id="version-selector" class="w-full appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option value="RJ-2023" selected>人教版 2023版</option>
                            <option value="SX-2022">苏教版 2022版</option>
                            <option value="BS-2023">北师大版 2023版</option>
                            <option value="HK-2024">沪科版 2024版</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
            </div>
            
            <!-- 章节树形导航 -->
            <div class="p-4">
                <div class="flex items-center justify-between mb-3">
                    <h3 class="font-medium text-sm text-gray-500">章节结构</h3>
                    <div class="flex space-x-1">
                        <button id="expand-all" class="text-xs text-gray-500 hover:text-primary">展开</button>
                        <span class="text-gray-300">|</span>
                        <button id="collapse-all" class="text-xs text-gray-500 hover:text-primary">收起</button>
                    </div>
                </div>
                
                <div class="space-y-1">
                    <!-- 章节1 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span class="font-medium">第一章 集合与常用逻辑用语</span>
                            </div>
                            <i class="fa fa-angle-down text-gray-400 transition-transform"></i>
                        </div>
                        
                        <div class="pl-6 mt-1 space-y-1">
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.1 集合的含义与表示</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">4课时</span>
                                </div>
                                
                                <div class="pl-6 mt-1 space-y-1 tree-line">
                                    <div class="knowledge-item bg-primary/5 border-l-2 border-primary p-2 rounded-r-lg cursor-pointer hover:bg-primary/10 transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                                <span>集合的定义</span>
                                            </div>
                                            <span class="text-xs text-gray-500">8题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>集合的表示方法</span>
                                            </div>
                                            <span class="text-xs text-gray-500">5题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>元素与集合的关系</span>
                                            </div>
                                            <span class="text-xs text-gray-500">4题</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </aside>
        
        <!-- 主内容区 -->
        <main class="flex-1 overflow-y-auto bg-gray-50 p-4 lg:p-6">
            <div class="container mx-auto">
                <!-- 面包屑导航 -->
                <div class="flex items-center text-sm text-gray-500 mb-4">
                    <a href="#" class="hover:text-primary">首页</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">教材版本管理</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">人教版 2023版</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">第一章 集合与常用逻辑用语</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">集合的定义</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">手工组卷</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <span class="text-primary font-medium">试卷预览</span>
                </div>
                
                <!-- 内容标题区 -->
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                    <div>
                        <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-gray-800">试卷预览</h2>
                        <p class="text-gray-500 mt-1">集合的定义 - 手工试卷</p>
                    </div>
                    
                    <div class="flex flex-wrap gap-3 mt-4 md:mt-0">
                        <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-edit mr-2"></i> 编辑试卷
                        </button>
                        <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-print mr-2"></i> 打印试卷
                        </button>
                        <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-download mr-2"></i> 下载PDF
                        </button>
                        <button class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                            <i class="fa fa-share-alt mr-2"></i> 发布试卷
                        </button>
                    </div>
                </div>
                
                <!-- 试卷预览区域 -->
                <div class="bg-white rounded-xl shadow-sm mb-6 overflow-hidden">
                    <div class="border-b border-gray-100 p-6">
                        <h3 class="font-medium">试卷信息</h3>
                    </div>
                    
                    <div class="p-6">
                        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
                            <div>
                                <p class="text-gray-500 text-sm mb-1">试卷名称</p>
                                <p class="font-medium">集合的定义 - 手工试卷</p>
                            </div>
                            
                            <div>
                                <p class="text-gray-500 text-sm mb-1">适用班级</p>
                                <p class="font-medium">高一(1)班</p>
                            </div>
                            
                            <div>
                                <p class="text-gray-500 text-sm mb-1">考试时长</p>
                                <p class="font-medium">45分钟</p>
                            </div>
                            
                            <div>
                                <p class="text-gray-500 text-sm mb-1">总分</p>
                                <p class="font-medium text-primary">100分</p>
                            </div>
                        </div>
                        
                        <div class="bg-gray-50 p-4 rounded-lg mb-6">
                            <div class="flex flex-wrap items-center justify-between">
                                <div class="flex items-center mb-3 md:mb-0">
                                    <span class="bg-blue-100 text-blue-600 text-sm font-medium px-3 py-1 rounded-full mr-2">选择题 (5题，共25分)</span>
                                    <span class="bg-green-100 text-green-600 text-sm font-medium px-3 py-1 rounded-full mr-2">填空题 (3题，共30分)</span>
                                    <span class="bg-orange-100 text-orange-600 text-sm font-medium px-3 py-1 rounded-full">解答题 (3题，共45分)</span>
                                </div>
                                
                                <div class="flex items-center space-x-3">
                                    <span class="text-sm text-gray-500">总分值：</span>
                                    <span class="font-bold text-primary">100分</span>
                                    <span class="text-sm text-gray-500 ml-2">题目数量：11题</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 试卷内容预览 -->
                <div class="bg-white rounded-xl shadow-sm mb-6 overflow-hidden">
                    <div class="border-b border-gray-100 p-6">
                        <h3 class="font-medium">试卷内容</h3>
                    </div>
                    
                    <div class="p-6">
                        <!-- 试卷头部 -->
                        <div class="text-center mb-10">
                            <h1 class="text-2xl font-bold mb-2">集合的定义 - 手工试卷</h1>
                            <p class="text-gray-600 mb-2">高一数学 · 人教版</p>
                            <p class="text-gray-600">考试时间：45分钟 &emsp;&emsp; 总分：100分</p>
                        </div>
                        
                        <!-- 选择题部分 -->
                        <div class="mb-10">
                            <h2 class="text-xl font-bold mb-6 pb-2 border-b border-gray-200">一、选择题（本大题共5小题，每小题5分，共25分）</h2>
                            
                            <div class="space-y-8">
                                <div class="question-item">
                                    <p class="font-medium mb-3">下列各组对象能构成集合的是（）</p>
                                    <div class="ml-4 space-y-2">
                                        <p>A. 充分接近√2的实数的全体</p>
                                        <p>B. 善良的人</p>
                                        <p>C. 某校高一(1)班所有身高在1.7m以上的学生</p>
                                        <p>D. 著名的数学家</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">设集合A={x|x是小于5的自然数}，则下列关系正确的是（）</p>
                                    <div class="ml-4 space-y-2">
                                        <p>A. 0∈A</p>
                                        <p>B. 1.5∈A</p>
                                        <p>C. -1∈A</p>
                                        <p>D. 5∈A</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">下列说法正确的是（）</p>
                                    <div class="ml-4 space-y-2">
                                        <p>A. 由1,2,2,4,1组成的集合有5个元素</p>
                                        <p>B. 集合{0}中没有元素</p>
                                        <p>C. 集合{π,e}与集合{e,π}是同一个集合</p>
                                        <p>D. 空集是任何集合的真子集</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">已知集合A={x|ax²+2x+a=0,a∈R}，若集合A有且仅有2个子集，则a的取值是（）</p>
                                    <div class="ml-4 space-y-2">
                                        <p>A. 1</p>
                                        <p>B. -1</p>
                                        <p>C. 0,1</p>
                                        <p>D. -1,0,1</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">设集合A={1,2,3}，B={2,3,4}，则A∩B=（）</p>
                                    <div class="ml-4 space-y-2">
                                        <p>A. {1,2,3,4}</p>
                                        <p>B. {2,3}</p>
                                        <p>C. {1,4}</p>
                                        <p>D. ∅</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 填空题部分 -->
                        <div class="mb-10">
                            <h2 class="text-xl font-bold mb-6 pb-2 border-b border-gray-200">二、填空题（本大题共3小题，每小题10分，共30分）</h2>
                            
                            <div class="space-y-8">
                                <div class="question-item">
                                    <p class="font-medium">用列举法表示集合{x∈N|x-1≤2}为__________。</p>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium">已知集合A={1,3,a}，B={1,a²-a+1}，且B⊆A，则a=__________。</p>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium">集合{1,2,3}的真子集个数为__________。</p>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 解答题部分 -->
                        <div>
                            <h2 class="text-xl font-bold mb-6 pb-2 border-b border-gray-200">三、解答题（本大题共3小题，共45分）</h2>
                            
                            <div class="space-y-10">
                                <div class="question-item">
                                    <p class="font-medium mb-3">（12分）已知集合A={x|x²-3x+2=0}，B={x|x²-ax+a-1=0}，若A∪B=A，求实数a的值。</p>
                                    <div class="mt-2 p-4 bg-gray-50 rounded-lg">
                                        <p class="text-sm text-gray-600">（解答空间）</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">（15分）设集合A={x|x²+4x=0}，B={x|x²+2(a+1)x+a²-1=0}，若B⊆A，求实数a的取值范围。</p>
                                    <div class="mt-2 p-4 bg-gray-50 rounded-lg">
                                        <p class="text-sm text-gray-600">（解答空间）</p>
                                    </div>
                                </div>
                                
                                <div class="question-item">
                                    <p class="font-medium mb-3">（18分）已知集合A={x|x²-5x+6=0}，B={x|mx-1=0}，且A∪B=A，求实数m的值组成的集合。</p>
                                    <div class="mt-2 p-4 bg-gray-50 rounded-lg">
                                        <p class="text-sm text-gray-600">（解答空间）</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 底部操作按钮 -->
                <div class="flex justify-end space-x-3 mb-6">
                    <button class="bg-white border border-gray-300 text-gray-700 px-6 py-3 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                        <i class="fa fa-edit mr-2"></i> 返回编辑
                    </button>
                    <button class="bg-primary text-white px-6 py-3 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                        <i class="fa fa-share-alt mr-2"></i> 发布试卷
                    </button>
                </div>
            </div>
        </main>
    </div>
    
    <!-- JavaScript -->
    <script>
        // 侧边栏切换
        document.getElementById('sidebar-toggle').addEventListener('click', function() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('-translate-x-full');
        });
        
        // 章节展开/收起
        document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
            item.addEventListener('click', function() {
                const content = this.nextElementSibling;
                const icon = this.querySelector('i.fa-angle-down');
                
                if (content.style.display === 'none') {
                    content.style.display = 'block';
                    icon.style.transform = 'rotate(180deg)';
                } else {
                    content.style.display = 'none';
                    icon.style.transform = 'rotate(0)';
                }
            });
        });
        
        // 默认展开第一个章节
        document.querySelector('.chapter-item > div:first-child').click();
        
        // 展开/收起所有章节
        document.getElementById('expand-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('i.fa-angle-down');
                
                content.style.display = 'block';
                icon.style.transform = 'rotate(180deg)';
            });
        });
        
        document.getElementById('collapse-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child, .section-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('i.fa-angle-down');
                
                content.style.display = 'none';
                icon.style.transform = 'rotate(0)';
            });
        });
        
        // 顶部导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 10) {
                header.classList.add('py-2');
                header.classList.add('shadow');
            } else {
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });
        
        // 打印功能
        document.querySelector('.fa-print').parentElement.addEventListener('click', function() {
            window.print();
        });
    </script>
</body>
</html>
    